<?php

class openapi_api_params_v1_oncredit extends openapi_api_params_abstract implements openapi_api_params_interface{

	public function checkParams($method,$params,&$sub_msg,$defined_params=array(),$dataType='kv'){
        if(parent::checkParams($method,$params,$sub_msg,$defined_params,$dataType)){
            return true;
        }else{
            return false;
        }
    }

    public function getAppParams($method){
        $params = array(
            'myoncredit'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'credit_status' => array('required'=>'false','type'=>'string','name'=>'信用额度状态'),
                'npage'=>array('required'=>'false','type'=>'int','name'=>'分页页码'),
            ),
            'oncreditApply'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'apply_money' => array('required'=>'true','type'=>'int','name'=>'申请的额度'),
            ),
            'toIssue'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
            ),
            'issueSave'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'store_id' => array('required'=>'true','type'=>'string','name'=>'下级ID'),
                'reply_money' => array('required'=>'true','type'=>'string','name'=>'额度'),
                'credit_period' => array('required'=>'true','type'=>'string','name'=>'账期'),
                'interest_rates' => array('required'=>'false','type'=>'string','name'=>'逾期利率'),
                'memo' => array('required'=>'false','type'=>'string','name'=>'备注'),
            ),
            'cancelOncredit'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'oncredit_id' => array('required'=>'true','type'=>'string','name'=>'授信申请ID'),
            ),
            'sub_oncredit'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'substore_id' => array('required'=>'false','type'=>'string','name'=>'下级经销商ID'),
                'credit_status' => array('required'=>'false','type'=>'string','name'=>'授信状态'),
                'npage'=>array('required'=>'false','type'=>'int','name'=>'分页页码'),
            ),
            'oncredit_detail'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'oncredit_id' => array('required'=>'true','type'=>'string','name'=>'授信额度ID'),
                'page' => array('required'=>'false','type'=>'string','name'=>'分页页码'),
            ),
            'suboncredit_opt'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'oncredit_id' => array('required'=>'true','type'=>'string','name'=>'授信额度ID'),
                'agree' => array('required'=>'false','type'=>'string','name'=>'是否同意'),
                'credit_period' => array('required'=>'false','type'=>'string','name'=>'批准账期'),
                'reply_money' => array('required'=>'false','type'=>'string','name'=>'批准额度'),
                'interest_rates' => array('required'=>'false','type'=>'string','name'=>'逾期利率'),
                'memo' => array('required'=>'false','type'=>'string','name'=>'审批备注'),
            ),
            'editsubcredit'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'oncredit_id' => array('required'=>'true','type'=>'string','name'=>'授信额度ID'),
                'credit_period' => array('required'=>'false','type'=>'string','name'=>'调整的账期'),
                'reply_money' => array('required'=>'false','type'=>'string','name'=>'调整的额度'),
                'memo' => array('required'=>'false','type'=>'string','name'=>'调整备注'),
            ),
            'editRates'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'oncredit_id' => array('required'=>'true','type'=>'string','name'=>'授信额度ID'),
                'interest_rates' => array('required'=>'false','type'=>'string','name'=>'调整的账期'),
            ),
        );

        return $params[$method];
    }
    
    public function description($method){
        $description = array(
            'myoncredit'=>array(
                'name'=>'我的授信额度',
                'description'=>'我的授信额度接口',
            ),
            'oncreditApply'=>array(
                'name'=>'授信额度申请',
                'description'=>'授信额度申请接口',
            ),
            'toIssue'=>array(
                'name'=>'下放授信额度',
                'description'=>'下放授信额度接口',
            ),
            'issueSave'=>array(
                'name'=>'下放授信额度',
                'description'=>'下放授信额度接口',
            ),
            'cancelOncredit'=>array(
                'name'=>'取消授信额度申请',
                'description'=>'取消授信额度申请接口',
            ),
            'sub_oncredit'=>array(
                'name'=>'下级授信额度',
                'description'=>'下级授信额度接口',
            ),
            'oncredit_detail'=>array(
                'name'=>'授信额度使用明细',
                'description'=>'授信额度使用明细接口',
            ),
            'suboncredit_opt'=>array(
                'name'=>'审批下级申请',
                'description'=>'审批下级申请接口',
            ),
            'editsubcredit'=>array(
                'name'=>'调整下级额度',
                'description'=>'调整下级额度接口',
            ),
            'editRates'=>array(
                'name'=>'调整下级逾期利率',
                'description'=>'调整下级逾期利率接口',
            ),
        );
        return $description[$method];
    }

}
